package com.library.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BookDTO {
    private Long id;
    
    @NotBlank(message = "书名不能为空")
    @Size(max = 200, message = "书名长度不能超过200个字符")
    private String title;
    
    @NotBlank(message = "作者不能为空")
    @Size(max = 100, message = "作者名称长度不能超过100个字符")
    private String author;
    
    @Size(max = 50, message = "ISBN长度不能超过50个字符")
    private String isbn;
    
    @Size(max = 50, message = "分类长度不能超过50个字符")
    private String category;
    
    private String description;
    
    private Integer stock;
    
    private Boolean isRecommended;
    
    private LocalDateTime createdAt;
}

